import numpy as np
import sys 

if __name__=='__main__':

    if (len(sys.argv)<2):
        print "usage: fields.py <nt> <tend>"
        sys.exit()

    nt = int(sys.argv[1])
    tend = float(sys.argv[2]);
    
    t = np.linspace(0,tend,nt)
    
    f = np.exp(-(t-tend/2)**2)

    F = np.vstack((t,f)).T
    
    np.savetxt("inputfield.dat",F)
